package org.yxt.message.push;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.yxt.message.push.config.listener.ApplicationEventListener;

/**
 * 消息推送中间件
 *
 * @anthor Yang xiutneg
 * @date 2020/6/23 15:02
 **/
// 开启定时任务调度去器
@EnableScheduling
@SpringBootApplication
@EnableTransactionManagement
// 将数据库操作层xml扫入
@MapperScan("org.yxt.message.push.dao")
public class App {

    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(App.class);
        // 监听
        springApplication.addListeners(new ApplicationEventListener());
        // springApplication.addListeners(new StartListener());
        //springApplication.addListeners(new CloseListener());
        springApplication.run(args);
    }
}
